package com.example.docmanagement.dto.response;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.UUID;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@JsonInclude(JsonInclude.Include.NON_NULL) // 空字段不序列化
@Schema(description = "客户响应数据")
public class CustomerResponse {

    /**
     * 客户 ID（主键，自增）
     */
    @Schema(description = "客户ID", example = "1")
    private Long id;

    /**
     * 客户名称
     */
    @Schema(description = "客户名称", example = "张三")
    private String name;

    /**
     * 客户邮箱
     */
    @Schema(description = "客户邮箱", example = "zhangsan@example.com")
    private String email;

    /**
     * 客户手机号
     */
    @Schema(description = "客户手机号", example = "13800000000")
    private String phone;

    /**
     * 客户状态
     */
    @Schema(description = "客户状态", example = "active", allowableValues = { "active", "inactive" })
    private String status = "active";

    /**
     * 创建时间
     */
    @Schema(description = "创建时间", example = "2024-01-20T14:20:00", type = "string", format = "date-time")
    private LocalDateTime createdAt;

    /**
     * 创建人ID
     */
    @Schema(description = "创建人ID", example = "386699c2-9362-4993-b8d8-0b537e5d67dc")
    private UUID createdByUserId;

    /**
     * 创建人
     */
    @Schema(description = "创建人", example = "system")
    private String createdBy;

    /**
     * 更新时间
     */
    @Schema(description = "更新时间", example = "2024-01-20T14:20:00", type = "string", format = "date-time")
    private LocalDateTime updatedAt;


    /**
     * 更新人ID
     */
    @Schema(description = "更新人ID", example = "386699c2-9362-4993-b8d8-0b537e5d67dc")
    private UUID updatedByUserId;

    /**
     * 更新人
     */
    @Schema(description = "更新人", example = "system")
    private String updatedBy;
}
